<template>
    <view class="content">
        <view class="line"></view>
        <view class="wrapper">
            <view class="logo" v-if="data.logo">
                <image :src="data.logo" mode="widthFix" style="margin: auto;"></image>
            </view>
            <u-parse :html="data.city_games" v-if="data.city_games"></u-parse>
            
            <view style="text-align: center;padding: 50upx 0;color: #999;font-size: 24rpx;" v-if="!data.city_games">暂无相关信息</view>
        </view>
        
        <!-- 底部导航 -->
        <u-tabbar v-model="current" :list="tab_list" active-color="#40bef1" height="110" @change="tabbarChange"></u-tabbar>
    </view>
</template>

<script>
    export default {
        data() {
            return {
                current: 0, //底部导航索引
                tab_list: [
                    {
                        iconPath: "/static/icon/tab.png",
                        selectedIconPath: "/static/icon/tab.png",
                        text: '',
                        pagePath: "/pages/tabbar/index",
                        customIcon: false
                    },{
                        iconPath: "/static/icon/tab_01.png",
                        selectedIconPath: "/static/icon/tab_02.png",
                        text: '活动',
                        customIcon: false,
                        pagePath: "/pages/tabbar/activity"
                    },{
                        iconPath: "/static/icon/tab_03.png",
                        selectedIconPath: "/static/icon/tab_04.png",
                        text: '商务合作',
                        customIcon: false,
                        pagePath: "/pages/tabbar/work"
                    },{
                        iconPath: "/static/icon/tab_05.png",
                        selectedIconPath: "/static/icon/tab_06.png",
                        text: '城会玩',
                        customIcon: false,
                        pagePath: "/pages/tabbar/city-games"
                    },{
                        iconPath: "/static/icon/tab_07.png",
                        selectedIconPath: "/static/icon/tab_08.png",
                        text: '个人中心',
                        customIcon: false,
                        pagePath: "/pages/tabbar/mine"
                    }
                ],
                data: {},
            };
        },
        onShow() {
            this.getData()
        },
        methods: {
            getData() {
                this.$ajax('city_games', {
                    // user_token: this.$getSync('userToken'),
                }).then(ret => {
                    if (ret.success == 1000) {
                        this.data = ret.detail
                    } else {
                        this.$toast(ret.msg);
                    }
                });
            },
            
            //切换底部导航
            tabbarChange(e) {
            	this.current = e;
            },
        }
    };
</script>

<style>
    .u-tabbar__content__item .u-icon__img {
    	width: 50rpx !important;
    	height: 50rpx !important;
    }
</style>

<style lang="scss">
    /deep/.u-tabbar__content>.u-tabbar__content__item:first-child .u-icon__img{
        width: 132rpx !important;
        height: 50rpx !important;
        margin-top: 15rpx;
    }
    
    page{
        background-color: #fff;
    }
    .line{
        width: 750rpx;
        height: 20rpx;
        background-color: #f6f6f6;
    }
    .wrapper{
        padding: 30rpx;
    }
    .logo{
        width: 253rpx;
        height: 253rpx;
        margin: auto;
    }

</style>
